// eslint-disable-next-line
import {
  PortalLayout
} from '@/layouts'

export const asyncRouterMap = [

  {
    path: '/',
    redirect: '/portal'
  },
  {
    path: '/portal',
    name: 'portal',
    component: PortalLayout,
    meta: { title: 'portal.index' },
    redirect: '/portal/workplace/1',
    children: [
      {
        path: '/portal/workplace/:id',
        name: 'portalWorkplace',
        component: () => import('@/views/portal/PortalWorkplace'),
        meta: { title: 'portal.workplace', keepAlive: false }
      }
    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  ...asyncRouterMap,
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }

]
